<?php
/**
 * licenses : MIT
 * creatTime: 2020/5/14
 * author : weblinuxgame
 * filename: UploadController.php
 */

namespace App\Http\Controllers\JsonApi;

use Illuminate\Http\Request;
use Illuminate\Http\Response;
use App\Http\Controllers\JsonApiController;
use App\Api\Modules\Attachments\AttachmentsApi;

/**
 * Class UploadController
 * @package App\Http\Controllers
 */
class UploadController extends JsonApiController implements AttachmentsApi
{

    /**
     * @param Request $request
     * @return Response|void
     */
    public function upload(Request $request)
    {
        if (!$request->hasFile('file')) {
            return $this->failed('请上传文件');
        }
        $file = $request->file('file');

    }

    /**
     * @param Request $request
     * @return Response|void
     */
    public function uploads(Request $request)
    {
        $files = $request->files;
    }
}
